// by Xeno
private ["_vehicle"];
#include "x_setup.sqf"
#include "x_macros.sqf"

#define __Poss _poss = x_sm_pos select 0;
#define __PossAndOther _poss = x_sm_pos select 0;_pos_other = x_sm_pos select 1;

x_sm_pos = [[7444.707,7004.2275,0], [7498.0703,7017.0449,0]]; // index: 44,   Steal chopper prototype near mount Klen
x_sm_type = "normal"; // "convoy"

#ifdef __SMMISSIONS_MARKER__
if (true) exitWith {};
#endif

if (X_Client) then {
	d_current_mission_text = "The enemy is testing a new protoype chopper . Steal it and bring it to the flag at your base.";
	d_current_mission_resolved_text = "Good job. You got the prototype chopper.";
};

if (isServer) then {
	_xchopper = (if (d_enemy_side == "EAST") then {"Ka52Black"} else {"AH1Z"});
	__PossAndOther
	_hangar = "Land_SS_hangar" createvehicle (_poss);
	_hangar setDir 90;
	__AddToExtraVec(_hangar)
	sleep 1.0123;
	_vehicle = objNull;
	_vehicle = _xchopper createvehicle (_poss);
	_vehicle setDir 270;
	sleep 2.123;
	["specops", 3, "basic", 3, _poss,100,true] spawn XCreateInf;
	sleep 2.221;
	["shilka", 2, "bmp", 1, "tank", 1, _pos_other,1,140,true] spawn XCreateArmor;
	sleep 2.543;
	[_vehicle] execVM "x_missions\common\x_sidesteal.sqf";
	allunits_add set [count allunits_add, _vehicle];
	_lvec = "TowingTractor" createvehicle (_poss);
	allunits_add set [count allunits_add, _lvec];
};

if (true) exitWith {};